import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useModalStore = defineStore('useModalStore', () => {
  const data = ref({ status: 200, data: { msg: 'ok' } })
  const isPops = ref(false)
  async function changeData(change: { status: number; data: { msg: string } }) {
    data.value = change
    isPops.value = true
    setTimeout(() => {
      isPops.value = false
    }, 800)
  }
  return { isPops, data, changeData }
})
